﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace RedisDemo.Models
{
    /// <summary>
    /// 课程内容
    /// </summary>
    public class CourseListDto
    {
        public long Id { get; set; }
        
        /// <summary>
        /// 封面图片地址
        /// </summary>
        [Required]
        [StringLength(1024)]
        public string CoverImgUrl { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Required]
        [StringLength(256)]
        public string Title { get; set; }

        /// <summary>
        /// 介绍/描述
        /// </summary>
        [Required]
        public string Introduction { get; set; }

        /// <summary>
        /// 价格，单位：分
        /// </summary>
        public int Price { get; set; }

        /// <summary>
        /// 置顶
        /// </summary>
        public bool IsTop { get; set; }

        /// <summary>
        /// 是否发布
        /// </summary>
        public bool IsPublish { get; set; }

        /// <summary>
        /// 发布者Id
        /// </summary>
        public long? LecturerId { get; set; }
        /// <summary>
        /// 讲师姓名
        /// </summary>
        [StringLength(256)]
        public string LecturerName { get; set; }

        /// <summary>
        /// 讲师简介
        /// </summary>
        public string Profile { get; set; }

    }

    /// <summary>
    /// 课程及关系
    /// </summary>
    public class UserCourseRelationListDto
    {
        public long Id { get; set; }

        public long UserId { get; set; }

        public long CourseId { get; set; } 

        
    }
}
